<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    1212
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="./ajax封装.js"></script>
    <script>
        //使用
        async function fn() {
            let [err,res] = await myajax({ type: 'post', url: '/index', data: { a: 10, b: 10 } });
            console.log(err,res);
        }
        fn();

    </script>
</body>

</html>